<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddCoinVoiceCallTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('voice_call', function (Blueprint $table) {
            $table->double('total_cost', 10, 1)->default(0.0)->comment('话单费用');
            $table->double('caller_cost', 10, 1)->default(0.0)->comment('拨打方扣除');
            $table->double('host_gain', 10, 1)->default(0.0)->comment('接听方分成');
            $table->double('allowance', 10, 1)->default(0.0)->comment('官方补贴');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('voice_call', function (Blueprint $table) {
            //
        });
    }
}
